<% content_for :breadcrumb do %>
  <li class="active">Home</li>
<% end %>

<h1>Listing articles</h1>

<div class="well">
  <%= link_to 'Create a new article and see how SimpleForm 2.0 works', new_article_path, :class => 'btn btn-primary' %>
</div>

<table class="table table-bordered table-striped">
  <thead>
    <tr>
      <th>#</th>
      <th>Name</th>
      <th>Content</th>
      <th>&nbsp;</th>
    </tr>
  </thead>
  <tbody>
    <% @articles.each do |article| %>
      <tr>
        <td><%= article.id %></td>
        <td><%= link_to article.name, article %></td>
        <td><%= article.content %></td>
        <td>
          <%= link_to 'Edit', edit_article_path(article) %>
          <%= link_to 'Destroy', article, :data => { :confirm => 'Are you sure?' }, :method => :delete %>
        </td>
      </tr>
    <% end %>
  </tbody>
</table>
